Don't fail for EPERM when hardlinking
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 20 Aug 2012 20:32:17 +0000 (22:32 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 20 Aug 2012 21:01:57 +0000 (23:01 +0200)
commit1057f8289ce5769f9d32cf05efbb6d00406e71a7
treec720809ead9ba8684c29fcda841eb9bb07c12daa
parent1d93a743dce1c764d3745ea8c23da574040b375e
Don't fail for EPERM when hardlinking

As the manual page doesn't say, but the in-code kernel documentation
shows, hardlinking for normal users can fail for a variety of
reasons (including very common situations such as non regular file
or non writable file), if the owner of the file does not match
the user linking (e.g. when checking out a shadow repo with a root-
owned master).
If that happens, fail back silently to copying instead of aborting
the whole operation.

https://bugzilla.gnome.org/show_bug.cgi?id=682298
src/libostree/ostree-repo.c